$(function(){
	$("#codeImg").click(function(){
		refreshCaptcha();
	});
	refreshCaptcha();
})

function submitForm(){
	$.form.submit({
		url: path + "/login/doLogin",
		success: function(result){
			if (result.state == web_status.SUCCESS) {
   				window.location.href = path + "/login";
   			}else{
   				$.alert.error(result.msg || "操作失败！");
   				refreshCaptcha();
   			}
		}
	});
}

function refreshCaptcha(){
	$("#codeImg").attr("src",path+"/login/refreshCaptcha?random=" + Math.random());
}